package com.whz.disruptor.handler;

import com.lmax.disruptor.ExceptionHandler;
import lombok.extern.slf4j.Slf4j;

/**
 * @author whz
 */
@Slf4j
public class DefaultExceptionHandler<T> implements ExceptionHandler<T> {

    @Override
    public void handleEventException(Throwable ex, long sequence, T event) {
        log.error("handle Event error:" + event, ex);
    }

    @Override
    public void handleOnStartException(Throwable ex) {
        log.error("Event OnStart", ex);
    }

    @Override
    public void handleOnShutdownException(Throwable ex) {
        log.error("Event OnShutdown", ex);
    }
}